Gomphotherium: A Command Line Mastodon Client

Gomphotherium (/ˌɡɒmfəˈθɪəriəm/; “welded beast”), a command line Mastodon client, offering a CLI as well as a TUI with a usage similar to rainbowstream for Twitter. It is intended to be used at 80 characters width maximum, but ideally inside tmux as a sidebar-style program.

Gomphotherium: A Command Line Mastodon Client

Project update here

I joined Twitter on the 2nd of May 2008. Back then, it was a small community of mostly tech enthusiasts who used the micro-blogging service to share random thoughts, interesting links and cat photos. Fast-forward to today, it is now a public company listed as TWTR on the NYSE and is used by the most powerful country leaders to spread their messages. Twitter has changed, a lot. Not only is it heavily being exploited by marketers to promote products and services, but also has it become a tool for spreading political agenda, misinformation and hatred.
Therefore I have stopped using Twitter sometime in the last year and instead jumped the bandwagon of the decentralized and open platform Mastodon.

Mastodon is much like the 2008 Twitter: A place for mainly tech enthusiasts to share random thoughts, interesting links and cat photos. Unlike Twitter, however, its decentralized nature makes it a large, federated network of small communities, where each one has its own individual values and rules, so that new joiners can pick their instance based on the content that resonates best with their views and beliefs.

However, while I continue have a Twitter account, its sole purpose is to allow me to follow a carefully curated list of people that unfortunately haven’t made the switch from Twitter to Mastodon yet and that I feel add value to my life. I don’t feed Twitter’s algorithms with new content, nor do I use any of their official apps or their website. Instead, my favorite client of choice is rainbowstream. It’s a terminal-based Twitter client that supports all the necessary features to allow reading (and, if you choose to, participating) on Twitter.

Unfortunately rainbowstream does not support Mastodon, which made switching from Twitter to Mastodon tricky. Mastodon has a decent web interface, but I refrain from using a browser when possible, especially when a service offers a good API. And while there are a handful of Mastodon clients, none of them nailed it for me.

On macOS, the only good client that I found so far is Mastonaut. Unfortunately it is a closed-source, macOS-only GUI client. Taking in consideration that I’m looking forward to drop macOS eventually, it isn’t a long-term option for me. Hence, I decided to build one on my own. One that offers a similar interface like rainbowstream and adds a few nifty features to it. One that could be built and installed on different systems, be it macOS, OpenBSD, Linux or even Plan9, without the need for dealing with dependencies or configs.

Meet Gomphotherium

First, let’s address the elephant in the room (pun intended): The name. Gomphotherium (/ˌɡɒmfəˈθɪəriəm/; “welded beast”) is an extinct genus of proboscids from the Neogene and early Pleistocene of Eurasia, Africa, North America and possibly also Asia. ¹ It’s a direct relative of the Mammut americanum – or how we use to call it, the Mastodon.

Gomphotherium (the one I built) is entirely written in Go (;-)) and makes use of mattn’s great go-mastodon library for communicating with the Mastodon API. It offers two user interfaces, a CLI that’s built with Cobra and a TUI that’s built with tview.

Right now Gomphotherium can do all the basics like displaying individual timelines and user profiles, tooting, boosting and fav-ing. In addition, it can attach media (e.g. pictures) to toots and even display media on the CLI! It integrates part of a tool called pixterm for that purpose, so that there is no dependency on external binaries like viu. It does however depend on system programs (e.g. pbcopy, xclip/wl-copy, …) in order to open toots in the default web browser or copy links to toots to the clipboard.

Here is a short demo video of how Gomphotherium works:

I’m looking forward to make Gomphotherium a feature-rich TUI/CLI Mastodon client that offers a UX similar to rainbowstream and VIM. If you’re interested in using it, check out the releases on GitHub and try it yourself. A user manual is available as well. And as always, contributions are welcome! :-)

Gomphotherium on GitHub

Enjoyed this? Support me via Monero, Bitcoin, Lightning, or Ethereum!  More info.